package etnorservice.etnor_service.request;

import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class ApiParamsRequest {
    @NotBlank(message = "API ID 不能为空")
    private String apiId;

    @NotBlank(message = "部署类型不能为空")
    private String deployType;

    @NotNull(message = "灰度发布比例不能为空")
    private Integer grayScale;

    @NotNull(message = "参数列表不能为空")
    private List<Parameters> parameters;

    private String talentId;

    @Data
    public static class Parameters {
        @NotBlank(message = "参数名称不能为空")
        private String name;

        private String description;

        @NotNull(message = "是否必填不能为空")
        private Boolean required;

        @NotBlank(message = "参数类型不能为空")
        private String type;
    }
}

